﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;


/// <summary>
/// Summary description for ManejoIncidentes
/// </summary>
public class ManejoIncidentes
{
    private DBMySql _mys;
    private string _desc;

    public string Desc
    {
        get { return _desc; }
        set { _desc = value; }
    }
	public ManejoIncidentes()
	{
        _mys = new DBMySql();
	}

    public bool InsIncidente()
    {
        string _sp = "InsIncidente";
        Parametros[] _array = new Parametros[2];
        _array[0] = new Parametros("_desc", Desc);
        _array[1] = new Parametros("_usu", HttpContext.Current.Session["Profesor"].ToString());

        return _mys.ExStoredProcedure(_sp, _array) ? true : false;
    }

    public DataTable SelIncidentes(string _fecha)
    {
        string _sp = "selIncidentes";
        Parametros[] _array = new Parametros[1];
        _array[0] = new Parametros("_fecha", _fecha);

        _mys.ReStoredProcedure(_sp, _array);
        return _mys.GetTabla;
    }


}